package com.louis.prefix;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.Resource;

/**
 * @author XRY
 * @date 2023年06月29日9:38
 */
public class TestDemo {
    public static void main(String[] args){
        //classpath:就表示通过前缀查找类路径下的资源
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:bean-prefix.xml");
        Resource resource = context.getResource("louis.txt");
        System.out.println("resource =  " + resource.getDescription());
        /*resource =  class path resource [louis.txt]*/
    }
}
